function t(e) {
    null == e.data.lotto && (l.showLoading("正在加载数据"), e.setData({
        showLoadError: 0,
        isStartLoad: !0
    })), wx.request({
        url: h.globalData.host + "/lotto/v1/detail",
        data: {
            lid: e.data.lid,
            access_token: l.getToken()
        },
        method: "GET",
        dataType: "json",
        success: function(o) {
            if (l.hideLoading(), -500 != o.data.sta) if (0 == o.data.sta) {
                e.setData({
                    contactUserInfo: '{ "nickName": "' + l.getStorage("userInfo").nickName + '", "avatarUrl": "' + l.getStorage("userInfo").avatarUrl + '" }'
                });
                var i = o.data.data;
                i.date = l.formatDate(1e3 * i.date, "yyyy-MM-dd HH:mm");
                var s = e.data.swiperBanner;
                i.banners.length > 1 && (s.indicatorDots = !0), i.banners.length && (s.imgUrls = i.banners);
                var n = i.phone;
                0 == i.join_status && n && (i.phone = n.substring(0, n.length - 4) + "****"), 2 == i.mode && n && 0 == i.is_owner && 2 !== i.join_status && (i.phone = ""), 
                console.log(i.title == i.prizes[0].name && 1 == i.prizes.length), i.title == i.prizes[0].name && 1 == i.prizes.length && (s.imgUrls[0] = i.prizes[0].img);
                var d = i.content;
                if ("string" == typeof d && (d = "" == d ? [] : [ {
                    type: "text",
                    value: d,
                    text: d
                } ]), i.content = d, e.setData({
                    lotto: i,
                    swiperBanner: s,
                    winDialogShow: !i.view_result,
                    isStartLoad: !1
                }), 0 == i.status && 2 != i.mode && a(e), 2 == i.mode) {
                    if (i.start_date > 0) {
                        var c = new Date().getTime();
                        (c = parseInt(c / 1e3)) - i.start_date >= 0 && i.join_num > 0 && (1 == i.is_owner || 0 == i.hide_winner) ? a(e) : e.setData({
                            total: 0
                        });
                    }
                    var h, u, g, p, f = parseInt(i.end_date), w = new Date().getTime();
                    if ((w = parseInt(w / 1e3)) < f) {
                        var m = f - w;
                        h = parseInt(m / 3600 / 24), u = parseInt((m - 3600 * h * 24) / 3600), g = parseInt((m - 3600 * h * 24 - 3600 * u) / 60), 
                        p = parseInt(m - 3600 * h * 24 - 3600 * u - 60 * g), h < 10 && (h = "0" + h), u < 10 && (u = "0" + u), 
                        g < 10 && (g = "0" + g), p < 10 && (p = "0" + p), e.setData({
                            endTimeArr: [ h, u, g, p ]
                        }), e.EndTime = setInterval(function() {
                            var t, a, o, s, n = parseInt(i.end_date), d = new Date().getTime();
                            if ((d = parseInt(d / 1e3)) < n) {
                                var r = n - d;
                                t = parseInt(r / 3600 / 24), a = parseInt((r - 3600 * t * 24) / 3600), o = parseInt((r - 3600 * t * 24 - 3600 * a) / 60), 
                                s = parseInt(r - 3600 * t * 24 - 3600 * a - 60 * o), t < 10 && (t = "0" + t), a < 10 && (a = "0" + a), 
                                o < 10 && (o = "0" + o), s < 10 && (s = "0" + s), e.setData({
                                    endTimeArr: [ t, a, o, s ]
                                });
                            } else clearInterval(e.EndTime);
                        }, 1e3);
                    }
                    var D = i.prizes, v = [], x = [ {
                        name: "谢谢参与",
                        img: "https://cdn-xcx-qunsou.weiyoubot.cn/xcx/2018-10-09/ef915e626f8746a3a5180986a7cc236d.png"
                    } ];
                    x = x.concat(D), console.log(x.sort(r));
                    for (var T = x.length, b = 1 / T, y = 0; y < x.length; y++) v.push({
                        turn: y * b + "turn",
                        lineTurn: y * b + b / 2 + "turn",
                        name: x[y].name,
                        img: x[y].img
                    });
                    console.log(v), e.setData({
                        awardsList: v
                    });
                }
                e.data.winDialogShow && wx.reportAnalytics("xiaochengxuhuanliang", {
                    show: 0
                }), i.no_forward && wx.hideShareMenu();
            } else -1 == o.data.sta && "data not found" == o.data.msg ? e.setData({
                dataNotFound: !0,
                isStartLoad: !1
            }) : (null == e.data.enroll && e.setData({
                showLoadError: 1,
                isStartLoad: !1
            }), l.showFailedToast("数据加载失败", o.data.msg)); else l.login(function() {
                t(e), e.setData({
                    hasUserInfo: !0,
                    isStartLoad: !1
                });
            }, function() {
                e.setData({
                    hasUserInfo: !1,
                    isStartLoad: !1
                });
            });
        },
        fail: function(t) {
            l.hideLoading(), null == e.data.enroll && e.setData({
                showLoadError: 1,
                isStartLoad: !1
            });
        }
    });
}

function a(t) {
    wx.request({
        url: h.globalData.host + "/lotto/v1/user_list",
        data: {
            lid: t.data.lid,
            access_token: l.getToken(),
            page: 1,
            count: 10,
            type: 1
        },
        method: "GET",
        dataType: "json",
        success: function(e) {
            if (l.hideLoading(), -500 != e.data.sta) if (0 == e.data.sta) {
                var o = e.data.data, i = !1;
                20 == o.users.length && (i = !0), t.setData({
                    users: o.users,
                    total: o.total,
                    moreData: i
                });
            } else l.showFailedToast("数据加载失败", e.data.msg); else l.login(function() {
                a(t), t.setData({
                    hasUserInfo: !0
                });
            }, function() {
                t.setData({
                    hasUserInfo: !1
                });
            });
        },
        fail: function(t) {
            l.hideLoading();
        }
    });
}

function e(a) {
    console.log({
        lid: a.data.lid,
        access_token: l.getToken(),
        join: 1,
        join_token: a.data.lotto.req_token
    }), wx.request({
        url: h.globalData.host + "/lotto/v3/join",
        data: {
            lid: a.data.lid,
            access_token: l.getToken(),
            join: 1,
            join_token: a.data.lotto.req_token
        },
        method: "POST",
        dataType: "json",
        success: function(o) {
            if (l.hideLoading(), -500 != o.data.sta) if (0 == o.data.sta) {
                t(a);
                var i = a.data.lotto;
                i.join_status = 1, a.setData({
                    lotto: i,
                    tokenDialog: !1,
                    isJoin: !0
                }), a.data.adClick || l.report({
                    page: "detail",
                    position: "wait_dialog",
                    type: "show",
                    appid: ""
                });
            } else l.showFailedToast("数据加载失败", o.data.msg); else l.login(function() {
                e(a), a.setData({
                    hasUserInfo: !0
                });
            }, function() {
                a.setData({
                    hasUserInfo: !1
                });
            });
        },
        fail: function(t) {
            l.hideLoading();
        }
    });
}

function o(t, a) {
    l.showLoading("正在获取图片");
    wx.request({
        url: h.globalData.host + "/lotto/v1/share",
        data: {
            lid: t.data.lid,
            type: a || 0,
            access_token: wx.getStorageSync("accessToken")
        },
        method: "GET",
        success: function(a) {
            l.hideLoading(), -500 != a.data.sta ? 0 == a.data.sta && a.data.data ? (t.setData({
                imageUrl: a.data.data.url,
                showShareDialog: !0
            }), i(t)) : l.showFailedToast("获取图片失败，请重试", a.data.msg) : l.login(function() {
                o(t), t.setData({
                    hasUserInfo: !0
                });
            }, function() {
                t.setData({
                    hasUserInfo: !1
                });
            });
        },
        fail: function(t) {
            l.hideLoading(), l.showFailedToast("获取图片失败，请重试");
        }
    });
}

function i(t) {
    wx.saveImageToPhotosAlbum ? (l.showLoading("正在保存"), wx.getImageInfo({
        src: t.data.imageUrl,
        success: function(a) {
            s(t, a.path);
        },
        fail: function(t) {
            l.hideLoading(), l.showModelTips("获取图片信息失败，原因:" + t.errMsg);
        }
    })) : l.showModelTips('1、点击下面的图片查看大图。2、长按或点击右上角三个点"..."保存到系统相册。3、分享给好友或群。');
}

function s(t, a) {
    wx.saveImageToPhotosAlbum({
        filePath: a,
        success: function(t) {
            l.hideLoading();
        },
        fail: function(e) {
            l.hideLoading();
            e.errMsg;
            wx.openSetting ? wx.showModal({
                title: "提示",
                content: "请授权抽奖小助手访问相册，该操作仅会方便您保存图片到相册，请放心授权。",
                cancelText: "不想授权",
                confirmText: "去授权",
                confirmColor: "#12b7f5",
                success: function(e) {
                    e.confirm ? wx.openSetting({
                        complete: function(e) {
                            s(t, a);
                        }
                    }) : e.cancel && l.showModelTips('如果您不愿授权，也可以通过点击下面的图片查看大图，然后长按或点击右上角三个点"..."保存到系统相册。');
                }
            }) : l.showModelTips('如果您不愿授权，也可以通过点击下面的图片查看大图，然后长按或点击右上角三个点"..."保存到系统相册。');
        }
    });
}

function n(t) {
    wx.request({
        url: getApp().globalData.host + "/lotto/v1/vip",
        data: {
            access_token: l.getStorage("accessToken")
        },
        method: "GET",
        success: function(a) {
            if (-500 != a.data.sta) {
                if (0 == a.data.sta) {
                    var e = l.getStorage("userInfo");
                    t.setData({
                        showDev: a.data.data,
                        avatar: e.avatarUrl,
                        nickname: e.nickName
                    }), 1 == a.data.data && wx.showShareMenu({
                        withShareTicket: !0
                    });
                }
            } else l.login(function() {
                n(t);
            });
        }
    });
}

function d(a) {
    wx.request({
        url: getApp().globalData.host + "/lotto/v1/run",
        data: {
            access_token: l.getStorage("accessToken"),
            lid: a.data.lid
        },
        method: "POST",
        success: function(e) {
            -500 != e.data.sta ? 0 == e.data.sta ? (a.setData({
                lottoRunDialog: !0
            }), t(a)) : l.showModelTips("开奖失败," + e.data.msg) : l.login(function() {
                d(a);
            });
        }
    });
}

function r() {
    return Math.random() > .5 ? -1 : 1;
}

var l = require("../../utils/util.js"), c = require("../../tmp/tmp.js"), h = getApp();

Page({
    data: {
        lid: "",
        showLoadError: !1,
        dataNotFound: !1,
        shareDialogHide: !0,
        shareDialogAnimate: !1,
        currentTab: 1,
        lotto: null,
        needRefresh: !1,
        ruleShow: !0,
        swiperBanner: {
            imgUrls: [ "https://cdn-xcxcustom.weiyoubot.cn/20180116/392dffeee3c320a1ab8e5a15d743522a.jpg" ],
            indicatorDots: !1,
            autoplay: !0,
            interval: 5e3,
            duration: 1e3
        },
        noticeBoard: h.globalData.noticeBoard,
        page: 1,
        count: 10,
        total: null,
        winDialogShow: !1,
        isJoin: !1,
        showDev: !1,
        lottoRunConfirm: !1,
        lottoRunDialog: !1,
        wish: {
            qrcode: "https://xcx-qunsou.weiyoubot.cn/wish/img/qrcode.png",
            appid: "wx3dd29bfe3e5f0d1d"
        },
        redDialog: !1,
        wishs: [ {
            wid: "5a7d3b8ca379e8aaf5513605",
            img: "https://cdn-xcxcustom.weiyoubot.cn/20180209/1070cbefa5e030dc5c02f09b3548f7fd.png"
        }, {
            wid: "5a7d3bcca379e8aaf5513636",
            img: "https://cdn-xcxcustom.weiyoubot.cn/20180209/54544ad123b8f0ee1cfc91b2a81233cc.png"
        } ],
        huoma: h.globalData.huoma,
        proName: "lotto",
        first: !0,
        contactUserInfo: '{ "nickName": "' + l.getStorage("userInfo").nickName + '", "avatarUrl": "' + l.getStorage("userInfo").avatarUrl + '" }',
        adClick: !1,
        swiper: h.globalData.adSwiper,
        adId: "0c380484d16ac876eb4a8da77c3b5ce0",
        awardsList: {},
        animationData: {},
        animationDataCopy: {},
        btnDisabled: "",
        endTimeArr: [ "00", "00", "00", "00" ]
    },
    onLoad: function(t) {
        var a = t.lid || "";
        if (l.isTextEmpty(a)) {
            var e = decodeURIComponent(t.q);
            console.log(e), a = "undefined" != e ? e.split("=")[1] : decodeURIComponent(t.scene || "");
        }
        this.setData({
            lid: a
        }), wx.canIUse && this.setData({
            canShare: wx.canIUse("button.open-type.share")
        }), c.ads(this, this.data.adId, "checkinsuccess");
    },
    onReady: function(t) {},
    onShow: function(a) {
        l.autoPlay(this, !0);
        var e = this;
        this.data.first ? (c.noticeBoard(this), c.wxLogin(this, function() {
            t(e), n(e);
        }), this.setData({
            first: !1,
            isGame: !1,
            isJoinGame: !1,
            btnDisabled: ""
        })) : this.setData({
            isJoinGame: !1,
            isGame: !1,
            btnDisabled: ""
        }), l.checkSession(this, function() {
            e.data.isStartLoad || (t(e), n(e));
        }), l.getStorage("ad_click") == l.formatDate(new Date(), "yyyy-MM-dd") && this.setData({
            adClick: !0
        });
    },
    onHide: function() {
        l.autoPlay(this, !1);
    },
    onReachBottom: function() {},
    showPic: function(t) {
        var a = t.currentTarget.dataset.type, e = t.currentTarget.dataset.url, o = [ e ];
        2 == a && (o = this.data.swiperBanner.imgUrls), wx.previewImage({
            current: e,
            urls: o
        });
    },
    previewPic: function(t) {
        var a = t.currentTarget.dataset.src;
        wx.previewImage({
            urls: [ a ]
        });
    },
    openNoticeBoard: function() {
        var t = this.data.noticeBoard;
        t.showUpgradeDialog = 1, this.setData({
            noticeBoard: t
        });
    },
    onShareAppMessage: function() {
        this.setData({
            shareDialogHide: !0,
            needRefresh: !1
        });
        wx.getStorageSync("userInfo").nickName;
        var t = "", a = this.data.lotto, e = "";
        return console.log(a), a && (a.owner_name, t = a.title), null != a && 2 == a.mode && (e = "https://cdn-xcxcustom.weiyoubot.cn/20181012/a69ecc75332ceae156f1fe9626cf311d.jpg"), 
        {
            title: t,
            path: "/pages/dailylotto/dailylotto?lid=" + this.data.lid,
            imageUrl: e,
            success: function(t) {
                wx.hideShareMenu && wx.hideShareMenu();
            }
        };
    },
    shareWxCircle: function(t) {
        l.buttonClicked(this);
        var a = t.currentTarget.dataset.id;
        this.setData({
            shareDialogHide: !0
        }), o(this, a);
    },
    showShareDialog: function() {
        this.setData({
            shareDialogAnimate: !0,
            shareDialogHide: !1
        });
    },
    closeShareDialog: function() {
        this.setData({
            shareDialogAnimate: !1
        });
        var t = this;
        setTimeout(function() {
            t.setData({
                shareDialogHide: !0
            });
        }, 300);
    },
    toAdDetail1: function(t) {
        var a = t.currentTarget.dataset.index, e = this.data.adsCard[a];
        l.toAdDetail(e, "detail_result");
    },
    swiperChange1: function(t) {
        var a = t.detail.current, e = this.data.adsCard[a];
        l.adShow(e, "detail_result");
    },
    ruleDetail: function(t) {
        "show" == t.currentTarget.dataset.opt ? this.setData({
            ruleShow: !0
        }) : this.setData({
            ruleShow: !1
        });
    },
    copy: function() {
        var t = this.data.lid;
        wx.setClipboardData({
            data: t,
            success: function(t) {}
        });
    },
    copyUrl: function() {
        var t = "pages/detail/detail?lid=" + this.data.lid;
        wx.setClipboardData({
            data: t,
            success: function(t) {
                l.showModelTips("抽奖路径复制成功");
            }
        }), this.closePathDialog();
    },
    copywxname: function() {
        var t = this.data.lotto.owner_wx;
        wx.setClipboardData({
            data: t,
            success: function(t) {
                l.showModelTips("微信号复制成功");
            }
        }), this.closePathDialog();
    },
    openPathDialog: function() {
        this.setData({
            pathDialog: !0,
            shareDialogHide: !0
        });
    },
    closePathDialog: function() {
        this.setData({
            pathDialog: !1
        });
    },
    showWxDialog: function() {
        this.setData({
            wxDialog: !0
        });
    },
    closeWxDialog: function() {
        this.setData({
            wxDialog: !1
        });
    },
    copyWx: function() {
        this.closeWxDialog();
        var t = this.data.lotto.owner_wx;
        wx.setClipboardData({
            data: t,
            success: function(t) {
                l.showModelTips("复制成功，请在微信里面添加好友");
            }
        });
    },
    toWinners: function() {
        l.buttonClicked(this), this.setData({
            winDialogShow: !1
        }), wx.navigateTo({
            url: "/pages/winners/winners?lid=" + this.data.lid
        });
    },
    closeWinDialog: function() {
        this.setData({
            winDialogShow: !1,
            isJoin: !1,
            isGame: !1,
            isJoinGame: !1,
            btnDisabled: ""
        });
    },
    closeDialog: function() {
        this.setData({
            showShareDialog: !1
        });
    },
    toBottom: function() {
        this.setData({
            winDialogShow: !1
        }), wx.pageScrollTo && wx.pageScrollTo({
            scrollTop: 5800
        });
    },
    join: function() {
        if (l.buttonClicked(this), 1 == this.data.lotto.status && 1 == this.data.lotto.join_status) return this.setData({
            isJoin: !0
        }), void (this.data.adClick || l.report({
            page: "detail",
            position: "wait_dialog",
            type: "show",
            appid: ""
        }));
        this.data.lotto.req_token ? this.setData({
            tokenDialog: !0
        }) : (this.setData({
            isStartLoad: !1
        }), e(this));
    },
    closeTokenDialog: function() {
        this.setData({
            tokenDialog: !1
        });
    },
    showLottoDialog: function() {
        this.setData({
            isJoin: !0
        }), this.data.adClick || l.report({
            page: "detail",
            position: "wait_dialog",
            type: "show",
            appid: ""
        });
    },
    toQrcode: function() {
        l.setStorage("qrcode", this.data.lotto.group_qr), wx.navigateTo({
            url: "/pages/qrcode/qrcode"
        });
    },
    toUsers: function() {
        l.buttonClicked(this), wx.navigateTo({
            url: "/pages/users/users?lid=" + this.data.lid
        });
    },
    toUserInfo: function() {
        l.buttonClicked(this), this.setData({
            winDialogShow: !1
        }), wx.navigateTo({
            url: "/pages/winnerinfo/winnerinfo?lid=" + this.data.lid
        });
    },
    toIndex: function() {
        wx.switchTab({
            url: "/pages/index/index"
        });
    },
    toDailyLotto: function(t) {
        if ("img" == t.currentTarget.dataset.type) {
            var a = l.formatDate(new Date(), "yyyy-MM-dd");
            l.setStorage("ad_click", a), l.report({
                page: "detail",
                position: "wait_dialog",
                type: "click",
                appid: ""
            });
        } else l.report({
            page: "detail",
            position: "to_dailylotto_button",
            type: "click",
            appid: ""
        });
        wx.switchTab({
            url: "/pages/dailylotto/dailylotto"
        });
    },
    postFormId: function(t) {
        l.postFormId(t.detail.formId);
    },
    lottoRun: function() {
        l.buttonClicked(this), this.closeRunConfirm(), d(this);
    },
    nowLotto: function() {
        this.setData({
            lottoRunConfirm: !0
        });
    },
    closeRunConfirm: function() {
        this.setData({
            lottoRunConfirm: !1
        });
    },
    closeRunDialog: function() {
        this.setData({
            lottoRunDialog: !1
        });
    },
    toMiniProgram: function(t) {
        var a = this.data.wish, e = t.currentTarget.dataset.index, o = this.data.wishs[e].wid;
        wx.navigateToMiniProgram ? wx.navigateToMiniProgram({
            appId: a.appid,
            path: "/pages/detail/detail?wid=" + o
        }) : wx.previewImage({
            urls: [ a.qrcode ]
        });
    },
    toSponsor: function() {
        var t = this.data.lotto.appid;
        t = l.trim(t);
        var a = this.data.lotto.path;
        wx.navigateToMiniProgram({
            appId: t,
            path: a || ""
        });
    },
    inputSponsor: function() {
        l.buttonClicked(this), wx.navigateTo({
            url: "/pages/sponsor/sponsor"
        });
    },
    toEdit: function(t) {
        var a = "normal";
        if (1 == this.data.lotto.mode) a = "mini"; else if (2 == this.data.lotto.mode && (a = "game", 
        this.data.lotto.join_num > 0)) return void l.showModelTips("已有人参与的抽奖不能再次编辑");
        l.buttonClicked(this), 1 == this.data.lotto.status ? wx.navigateTo({
            url: "/pages/edit/edit?lid=" + this.data.lid + "&type=" + a
        }) : l.showModelTips("不能编辑已经结束的抽奖");
    },
    copyBody: function(t) {
        var a = t.currentTarget.dataset.index, e = this.data.lotto.content || [], o = e.length >= a ? e[a].body : "";
        wx.setClipboardData({
            data: o,
            success: function(t) {
                l.showModelTips("复制成功");
            }
        });
    },
    verifyToken: function(t) {
        var a = t.detail.value.token;
        "" != a ? a == this.data.lotto.req_token ? (this.setData({
            isStartLoad: !1,
            tokenDialog: !1
        }), e(this)) : l.showModelTips("口令输入错误，请再试试") : l.showModelTips("请输入口令");
    },
    copyCreate: function() {
        var t = "normal";
        1 == this.data.lotto.mode ? t = "mini" : 2 == this.data.lotto.mode && (t = "game"), 
        l.buttonClicked(this), 0 != this.data.lotto.is_owner ? wx.navigateTo({
            url: "/pages/create/create?lid=" + this.data.lid + "&type=" + t
        }) : l.showModelTips("你不是发起者，无此权限");
    },
    toCreate: function() {
        var t = "normal";
        this.data.lotto.title == this.data.lotto.prizes[0].name && 1 == this.data.lotto.prizes.length && (t = "mini"), 
        l.buttonClicked(this), wx.navigateTo({
            url: "/pages/create/create?type=" + t
        });
    },
    toHuoma: function() {
        l.buttonClicked(this);
        var t = this.data.huoma;
        wx.navigateToMiniProgram ? wx.navigateToMiniProgram({
            appId: t.appid
        }) : wx.previewImage({
            urls: [ t.qrcode ]
        });
    },
    tell: function() {
        wx.makePhoneCall({
            phoneNumber: this.data.lotto.phone
        });
    },
    winnersList: function() {
        l.buttonClicked(this), wx.navigateTo({
            url: "/pages/winnerslist/winnerslist?lid=" + this.data.lid
        });
    },
    getLottery: function() {
        if (0 == this.data.lotto.join_status) {
            if (this.data.lotto.start_date > 0) {
                var a = new Date().getTime();
                if ((a = parseInt(a / 1e3)) - this.data.lotto.start_date < 0) return void l.showModelTips("开始时间 " + l.formatDate(1e3 * this.data.lotto.start_date, "yyyy-MM-dd HH:mm"), "活动未开始");
                if (a - this.data.lotto.end_date > 0) return void l.showModelTips("活动已结束");
            }
            if ("disabled" != this.data.btnDisabled) {
                var o = this;
                wx.request({
                    url: h.globalData.host + "/lotto/v3/join",
                    data: {
                        lid: o.data.lid,
                        access_token: l.getToken()
                    },
                    method: "POST",
                    dataType: "json",
                    success: function(a) {
                        if (l.hideLoading(), -500 != a.data.sta) if (0 == a.data.sta) {
                            var i = o.data.awardsList, s = i.length, n = o.data.lotto.prizes, d = a.data.data.prize_no, r = "";
                            if (console.log(d), void 0 == d) return void l.showFailedToast("太多人参与，请刷新参与");
                            for (var c = 0; c < i.length; c++) parseInt(d) < 0 ? "谢谢参与" == i[c].name && (r = c) : a.data.data.prize_name == i[c].name && (r = c);
                            console.log(i, r), h.runDegs = (1440 - r * (360 / s)).toFixed(2);
                            var u = wx.createAnimation({
                                duration: 6e3,
                                timingFunction: "ease"
                            });
                            o.animationRun = u, u.rotate(h.runDegs).step(), o.setData({
                                animationDataCopy: u.export(),
                                btnDisabled: "disabled"
                            }), setTimeout(function() {
                                if (-1 != d) {
                                    var a = o.data.lotto;
                                    a.prize_name = n[d].name, a.prize_img = n[d].img, o.setData({
                                        isGame: !0,
                                        lotto: a
                                    });
                                } else o.setData({
                                    isGame: !0
                                });
                                t(o);
                            }, 6e3);
                        } else l.showFailedToast("数据加载失败", a.data.msg); else l.login(function() {
                            e(o), o.setData({
                                hasUserInfo: !0
                            });
                        }, function() {
                            o.setData({
                                hasUserInfo: !1
                            });
                        });
                    },
                    fail: function(t) {
                        l.hideLoading();
                    }
                });
            }
        } else this.setData({
            isJoinGame: !0
        });
    }
});